package com.github.appintro;

import ohos.agp.components.Component;
import ohos.agp.components.DirectionalLayout;
import ohos.agp.components.LayoutScatter;
import ohos.app.Context;

public class AppIntroCustomLayoutFragment extends DirectionalLayout {
    private int layoutResId;
    private Context context;

    public AppIntroCustomLayoutFragment(Context context, int layoutResId) {
        super(context);
        this.context = context;
        this.layoutResId = layoutResId;
        LayoutScatter.getInstance(context).parse(layoutResId, this, true);
    }

    public Component getCustomComponent() {
        return LayoutScatter.getInstance(context).parse(layoutResId, this, true);
    }
}
